﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AcSDK
{
    public class ClientConfig
    {
        public string Url { get; set; }

        public string AppKey { get; set; }

        public string AppSecret { get; set; }

        public long CompanyId { get; set; }


        public ClientConfig()
        {
            Url = Convert.ToString(((NameValueCollection) ConfigurationSettings.GetConfig("ClientList/Client"))["Url"]);
                AppKey = Convert.ToString(((NameValueCollection)ConfigurationSettings.GetConfig("ClientList/Client"))["AppKey"]);
            AppSecret =
                Convert.ToString(
                    ((NameValueCollection) ConfigurationSettings.GetConfig("ClientList/Client"))["AppSecret"]);
            CompanyId =
                long.Parse(((NameValueCollection) ConfigurationSettings.GetConfig("ClientList/Client"))["CompanyId"]);
        }
    }
}
